Conventionally, an object (sound source) is displayed so that it appears to be provided in a virtual three-dimensional space and generate a sound. To do so, a process is executed so that the sound is heard from a direction in which the object is located.
However, in conventional techniques, for example, in a situation that there are a plurality of sound sources located in different directions, there is room for improvement with regard to distinguishing between sounds of the sound sources.
Therefore, it is an object of an exemplary embodiment to provide an information processing program, information processing device, information processing system, and information processing method which can distinguishing between sounds of sound sources located in different directions.
In order to achieve the object, exemplary embodiments have configurations as follows.
An exemplary embodiment is a computer-readable storage medium storing an information processing program executable by a computer of an information processing device for generating an image of a virtual space captured by a virtual camera and outputting a sound of a sound source provided in the virtual space. The program causes the computer to execute calculating a direction of the sound source as viewed from the virtual camera or a predetermined character provided in the virtual space, correcting the sound of the sound source by applying a predetermined filter to the sound when the sound source is located in a predetermined direction, and outputting the corrected sound.
With this configuration, when the sound source is located in a predetermined direction as viewed from the virtual camera (e.g., behind the virtual camera, to the right of the virtual camera, etc.), a predetermined filter is applied to the sound of the sound source. For example, when the sound source is located behind the virtual camera, a frequency filter may be applied to the sound of the sound source so that the sound becomes muffled.
In another configuration, an angle between an imaging direction of the virtual camera or a direction measured with reference to the predetermined character and the direction of the sound source may be calculated.
With this configuration, for example, an angle between the imaging direction of the virtual camera and the direction of the sound source is calculated.
In another configuration, when the calculated angle is greater than a first threshold value, the sound may be corrected.
With this configuration, when the calculated angle is greater than a predetermined threshold value, the sound is corrected.
In another configuration, a degree of correction of the sound may be increased with an increase in the calculated angle.
With this configuration, the degree of correction of the sound is increased with an increase in the angle.
In another configuration, when the sound source is located behind the virtual camera or the predetermined character, the sound may be corrected.
With this configuration, when the sound source is located behind the virtual camera or the predetermined character, the sound is corrected.
In another configuration, the sound may also be corrected based on a distance between the virtual camera or the predetermined character and the sound source.
With this configuration, the sound is additionally corrected based on the distance between the virtual camera or the predetermined character and the sound source.
In another configuration, when the distance between the virtual camera or the predetermined character and the sound source is larger than a second threshold value, the sound may be corrected.
With this configuration, when the distance between the virtual camera and the sound source is larger than the second threshold value, the sound is corrected. Specifically, a sound of a sound source located in the vicinity of the virtual camera is not corrected, while a sound of a sound source located the second threshold value away from the virtual camera is corrected.
In another configuration, a degree of correction of the sound may be increased with an increase in the distance.
With this configuration, the degree of correction is increased with an increase in the distance.
In another configuration, a maximum value of a degree of correction may be set based on the angle. The degree of correction may be determined within the maximum value based on a distance between the virtual camera or the predetermined character and the sound source, and the sound may be corrected based on the degree of correction.
With this configuration, the maximum value of the degree of correction is set based on the angle. The degree of correction is determined within the maximum value based on the distance.
In another configuration, the degree of correction of the sound may be increased by increasing a degree of attenuation of a volume of a predetermined frequency component of the sound.
With this configuration, the degree of correction is increased by increasing the degree of attenuation of a predetermined frequency component.
In another configuration, the sound may be corrected by attenuating a predetermined frequency component of the sound.
With this configuration, the sound is corrected by attenuating a predetermined frequency component.
In another configuration, the program may cause the computer to further execute determining whether or not to correct the sound, based on the type of the sound source or the type of the sound of the sound source. When it is determined that the sound is to be corrected, the sound is corrected.
With this configuration, it is determined whether or not the sound is to be corrected, based on the type of the sound source or the type of the sound of the sound source.
In another configuration, a degree of correction of the sound may be set based on the type of the sound source or the type of the sound of the sound source, and the sound may be corrected to the degree of correction.
With this configuration, the degree of correction is set based on the type of the sound source or the type of the sound of the sound source.
In another configuration, the predetermined filter may be a frequency filter.
With this configuration, the sound is easily corrected using a frequency filter.
In another configuration, the frequency filter may be at least one of a low-pass filter and a band-pass filter.
With this configuration, at least one of a low-pass filter and a band-pass filter is used as the frequency filter.
An exemplary embodiment may be an information processing device (information processing system) for executing the above information processing program. The information processing system may include a single device or a plurality of devices which operate in cooperation with each other. An exemplary embodiment may be an information processing method executable in the information processing system.
According to an exemplary embodiment, it is possible to distinguish between sounds of sound sources located in different directions.
These and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.